import axios from 'axios'
import { MessageBox, Message } from 'element-ui'

const service = axios.create({
  baseURL: 'http://36.111.45.214:5010/mqttauth',
  // baseURL: process.env.NODE_ENV === 'development' ? 'http://127.0.0.1:5010/mqttauth' : 'http://36.111.45.214:5010/mqttauth',
  timeout: 120000,
})

service.interceptors.request.use(
  (config) => {
    return config
  },
  (error) => {
    console.log('request RAW', error)
    return Promise.reject(error)
  }
)

export default service
